#ifndef MYDATETABLE_H
#define MYDATETABLE_H

#include "mytablewidget.h"

#include <QMenu>
#include <QWidget>

class MyDateTable : public MyTableWidget
{
    Q_OBJECT
public:
    explicit MyDateTable(QWidget *parent = nullptr);

    void setDateHorizontalHeaderStyle(QFont headerFont, QString styleSheet, bool headFixed);

    void createItemAndSetStyle(int row, int col);

    void setDateTableWidgetStyle(void);

    void paintCalender(int row, int col, QString text);

    void clearCalender(void);

    void addNewRow(int row);

    void createActions(void);

    void changeDateItemBackground(int row, int col, int daytype);

    void resetItemBackground(QTableWidgetItem *pItem, int col);

    int getDateItemText(int row, int col, QString & string);

signals:
    void signal_changeDayAction_triggered(QPoint pos, int dayType);
    void signal_changeWorkAction_triggered(QPoint pos, int dayType);

private slots:
    void slot_menu_customContextMenuRequested(const QPoint &pos);

private:
     QMenu * pMenu;
     QPoint menuPos;
};

#endif // MYDATETABLE_H
